

package net.mtg;

import net.mtg.io.*;
import java.util.*;


public class MTGCard {

    protected MTGAbilityScript abilities;

    private char[] castingCost = {0, 0, 0, 0, 0, 0};
    private String name = "";
    private MTGPlayer owner = null;

    private int cardType = -1;
    public static final int MTG_TYPE_NONE        = -1;
    public static final int MTG_TYPE_CREATURE    = 1;
    public static final int MTG_TYPE_ENCHANTMENT = 2;
    public static final int MTG_TYPE_ARTIFACT    = 4;
    public static final int MTG_TYPE_SORCERY     = 8;
    public static final int MTG_TYPE_INSTANT     = 16;
    public static final int MTG_TYPE_LAND        = 32;

    /* Here is data used for various types of cards */
    /*  Land data */
    private int landColor = -1;
    public static final int MTG_LAND_BLACK = 1;
    public static final int MTG_LAND_WHITE = 2;
    public static final int MTG_LAND_BLUE  = 4;
    public static final int MTG_LAND_RED   = 8;
    public static final int MTG_LAND_GREEN = 16;

    /*  Creature Data */
    private int power = -1;
    private int toughness = -1;

    /*  Artifact Data */
    // None for now...

    /*  Enchantment Data */
    private String enchantPerm = null; // If this enchants a permanent.

    public MTGCard(MTGAbilityScript script){
	abilities = script;
	abilities.initCard(this);
    }

    public int getMTGCardType(){
	return cardType;
    }

    public void runAbilities(MTGEnviroment env){
	
    }

    public boolean equals(MTGCard card){
	if (card.name = this.name) return true;
	return false;
    }

}